
import { axiosGet, axiosPost, axiosPut, axiosDelete } from '/@/api/RequestBase';
import { SqlSugarPagedList, BaseKeywordPageInput } from '/@/api/BaseDto';

import { TraFaXueInput } from './dto/TraFaXueInput';
import { TraFaXueOutput } from './dto/TraFaXueOutput';
import { TraFaXueMingXiInput } from './dto/TraFaXueMingXiInput';
import { TraFaXueMingXiOutput } from './dto/TraFaXueMingXiOutput';
import { TraFaXueMessage } from './dto/TraFaXueMessage';
import { FaXueAddInput } from './dto/FaXueAddInput';

export type { TraFaXueInput, TraFaXueOutput, TraFaXueMingXiInput, TraFaXueMingXiOutput, TraFaXueMessage, FaXueAddInput };

const service = 'traFaXue/'; // 要写后面的斜杠, 不要写前面的斜杠
const mingxiService = 'traFaXueMingXi/'

export const TraFaXueApi = {
	page: (data: BaseKeywordPageInput) => {
		return axiosPost<SqlSugarPagedList<TraFaXueOutput>>(service + 'page', data);
	},
	get: (id: string) => {
		return axiosGet<TraFaXueOutput>(service + `get/${id}`);
	},
	getMeesage: (id: string) => {
		return axiosGet<TraFaXueMessage>(mingxiService + `getMessage/${id}`);
	},
	add: (data: FaXueAddInput) => {
		return axiosPost<TraFaXueOutput>(service + 'add', data);
	},
	update: (data: TraFaXueInput) => {
		return axiosPost<boolean>(service + 'update', data);
	},
	updateZhuBiao: (data: TraFaXueInput) => {
		return axiosPost<boolean>(service + 'updateZhuBiao', data);
	},
}
